<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>111</title>
    <style>
        div{
            margin: 20px;
        }
    </style>
</head>
<body>
<form th:action="@{/additems}"  method="get" accept-charset="utf-8" th:align="center">
    <div class="container-fluid">
        <div class="row">
            <span class="col-md-1 col-md-offset-1">标题</span>
            <input class="col-md-4" type="text" name="items_title">
        </div>
        <div class="row">
            <span class="col-md-1 col-md-offset-1">内容</span>
            <textarea cols="50" rows="10" name="items_content"></textarea><br />
        </div>
        <div class="row">
            <span class="col-md-1 col-md-offset-1">截止时间</span>
            <input class="col-md-4" type="text" name="end_time" placeholder="小时">
        </div>
        <div class="row">
            <span class="col-md-1 col-md-offset-1">优先级</span>
            <input class="col-md-4" type="text" name="priority_id" placeholder="(1:high 2:middle 3:low)">
        </div>
        <div class="row">
            <button type="submit" class="col-md-1 col-md-offset-2">确定</button>
            <button type="reset" class="col-md-1 ">重置</button>
        </div>
    </div>
</form>

<!--<script type="text/javascript" th:src="@{https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js}"/>
<script>
    $(function () {
        $("#btn").click(function () {
            $.post("${pageContext.request.contextPath}/ajax/a1",function(list){
                console.log(list);
                console.log("测试");
                var unitObj=document.getElementById("mySelect"); //页面上的<html:select>元素
                if(list!=null){ //后台传回来的select选项
                    for(var i=0;i<list.length;i++){
                        //遍历后台传回的结果，一项项往select中添加option
                           unitObj.options.add(new Option(list[i].name,list[i].name));
                    }
                }
            })
        })

    })

</script>-->
</body>
</html>

